package com.arpa.wms.service;

import com.arpa.core.web.Result;
import com.arpa.wms.domain.dto.PutawayItemDTO;
import com.arpa.wms.domain.entity.PutawayItem;
import com.arpa.wms.domain.vo.PutawayItemVO;
import com.arpa.wms.domain.vo.PutawayItemWithRegisterVO;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 上架明细 服务类
 * </p>
 *
 * @author LEO
 * @since 2020-08-04
 */
public interface IPutawayItemService extends IService<PutawayItem> {

    /**
     * 保存
     * @param entity
     * @return
     */
    @Override
    boolean save(PutawayItem entity);

    /**
     * 根据code更新实体
     * @param entity
     * @return
     */
    int updateByCode(PutawayItem entity);

    /**
     * 查询列表
     * @param putawayItemDTO
     * @return
     */
    List<PutawayItemVO> queryList(PutawayItemDTO putawayItemDTO);

    /**
     * 查询合计,包含总数
     * @param putawayItemDTO
     * @return
     */
    PutawayItemVO queryListSum(PutawayItemDTO putawayItemDTO);

    /**
     * 根据code字符串获取上架单详情列表
     * @param codes
     * @return
     */
    List<PutawayItemVO> queryListByCodes(List<String> codes,String groupCode);

    List<PutawayItem> queryAllList(LambdaQueryWrapper<PutawayItem> eq);

    List<PutawayItemWithRegisterVO> queryItemWithRegisterList(PutawayItemDTO putawayItemDTO);

    /**
     * @description
     * 更新上架明细的已上架数量
     * @author xuyang
     * @date 2020/10/30 16:31
     * @param code:
     * @param registerStatus:
     **/
    int updateRegisterQuantity(String code, String registerStatus);

    Result putawayInfo(PutawayItemDTO putawayItemDTO);

}
